// 月卡
import service from '@/utils/request'

/**
 * 获取月卡列表
 */
export const getCardListAPI = params => {
  return service({
    url: '/parking/card/list',
    method: 'get',
    params
  })
}

/**
 * 添加月卡
 */
export const addMonthCardAPI = data => {
  return service({
    url: '/parking/card',
    method: 'post',
    data
  })
}

/**
 * 获取月卡详情
 */
export const getCardDetailAPI = id => {
  return service({
    url: `/parking/card/detail/${id}`,
    method: 'get'
  })
}
/**
 * 编辑月卡
 */
export const editCardDetailAPI = data => {
  return service({
    url: `/parking/card/edit`,
    method: 'put',
    data
  })
}

/**
 *删除月卡
 */
export const deleteCardAPI = ids => {
  return service({
    url: `/parking/card/${ids}`,
    method: 'Delete'
  })
}
